package com.besttone.model;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.besttone.common.StaticConstantType;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

@SuppressWarnings("serial")
public class NotifyMesage extends Model<NotifyMesage> {
    private static Log _log = LogFactory.getLog(NotifyMesage.class);
    public static NotifyMesage dao = new NotifyMesage();

    public Page<NotifyMesage> getNotSyncData(int pageNumber) {
	String select = "select  n.id as id,n.createdTime as target_time,n.mtmsgid as msg_id,n.mttotal as mt_total,n.mttype as mt_type,n.mtstatus as mt_status,n.mterrcode as mt_errcode ";
	String sqlExceptSelect = " from notifymesage n where is_sync="
		+ StaticConstantType.IS_NOT_SYNC;
	return dao.use("hooksms").paginate(pageNumber, 10, select,
		sqlExceptSelect);
    }
}
